package com.pingan.demospringevent.service;

import com.pingan.demospringevent.UserRegisterEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Service;

/**
 * @Author: JLL
 * @Date: 2020/2/23 18:55
 */
@Service
public class JifenService implements ApplicationListener<UserRegisterEvent> {

    @Override
    public void onApplicationEvent(UserRegisterEvent userRegisterEvent) {
        System.out.println("积分服务接到通知，给 " + userRegisterEvent.getSource() + " 加50积分...");
    }
}
